The present invention relates generally to a computer method and system for sharing application programs, and, more specifically, to a method and system for managing data while sharing application programs.
The modern workplace is increasingly reliant on the use of networks. A network is a group of computers that are connected by communications facilities. A network enables the transfer of information in electronic form between computers. Typically, each of the computers has local application programs, such as a word processing program, that can be executed at that computer. These application programs may access files that contain data, such as a word processing document. The files can be transferred from one computer to another using the network. Thus, it is possible for a user at one computer to modify the data in a file and then transfer the file to another computer so that a user at that other computer can view and modify the data in the file.
Some computers allow a user to execute an application program at one computer and have the screen output of that application program be displayed at one other computer. In this way, two users at distant locations can follow the execution of the application program. Indeed, some computers even allow the user at the other computer to input data that is sent to the executing application. For example, the two users can simultaneously see at their computers the contents of a word processing document as it is being modified, and both can participate in modifying the word processing document. Such use of an application program is known as xe2x80x9capplication sharing.xe2x80x9d To share an application program, each computer receives the output of the application program (i.e., application output) for display. Each computer then stores this application output in a data pool at that computer. At each computer that is sharing the application program, the data pool contains the same data and is referred to as a xe2x80x9cshared data pool.xe2x80x9d The shared data pool stores data for an application program. Either of the users at the computers may provide input to the application program. The application program processes the input and stores the output in the shared data pool. The application data from the shared data pool is transmitted to each computer. Then each application program at each computer displays the received data from the shared data pool at that computer.
In a typical network of computers using a shared data pool, one of the computers (i.e., the guard computer) is designated to control access to the shared data pool. For one of the computers in the network to modify the shared data pool, that computer sends an indication to the guard computer indicating the modification. The guard computer modifies the shared data pool and then sends indications to the computers which are using that shared data pool, indicating the modification. In this manner, each computer receives the modifications to the shared data pool. It would be useful for each computer to have direct access to the shared data pool independent of each other computer.
Additionally, it would be useful to allow a new computer to join in using the shared data pool. In a typical network of computers, when a new computer joins in using the shared data pool, that new computer notifies the guard computer that it is joining. Then, the guard computer provides the new computer with the data in the shared data pool. While the guard computer is providing the new computer with the data, the guard computer is not able to process modifications to the shared data pool. Therefore, there is a delay in the guard computer processing modifications to the shared data pool indicated by other computers. It would be useful if other computers could continue to modify the shared data pool while a new computer is receiving data.
The present invention provides a method and system for managing data shared by multiple instances of a shared application program. A shared application program has instances executing simultaneously on multiple computers and has a copy of data that is being shared by each instance of the application program. Each computer maintains a copy of the shared data. When an instance of the shared application program modifies the shared data, the modifications are sent to the other computers. Each of these other computers stores the data in its copy of the shared data. In addition, each instance of the application program at these computers updates its user interface to reflect the modifications to the shared data. An object management (OM) system provides services through which shared application programs can manage the shared data. In particular, each computer has a copy of the OM system. The OM system, under the direction of the shared application program, manages the adding, deleting, and modifying of the shared data. The OM system also controls the transmitting of modifications to the copy of the shared data to the other computers.
In one aspect of the present invention, an application program is shared among a plurality of computers. Each computer executes an instance of the application program, and each instance of the application program has application data. Each computer also has a connection to each other computer, has an object management system for synchronizing the application data, and has a display on which the application data is displayed. At each computer, under control of the instance of the application program, an action to be performed on the application data is received from a user. Then, an action indication is transmitted from the instance of the application program to the object management system at that computer. The action indication indicates the received action. Under control of the object management system, the transmitted action indication is received from the instance of the application program. The received action indication is broadcast by the object management system to each other object management system at each other connected computer. Then, the object management system performs the action indicated by the received action indication on the application data. The object management system also notifies the instance of the application program that the action was performed on the application data. Under control of the instance of the application program, the notification is received from the object management system. Then the application program updates the display based on the application data on which the action was performed.
At each connected computer, under control of the object management system at that computer, the broadcast action indication is received from the other computer. Then the object management system performs the action indicated by the received action indication on the application data. The object management system also notifies the instance of the application program at that computer that the action was performed on the application data. Under control of the instance of the application program, the notification from the object management system is received. Then the instance of the application program updates the display based on the application data on which the action was performed.
In another aspect of the present invention, a new computer joins in sharing an application program with a plurality of other computers. Each computer has a connection to each other computer. Each computer that is sharing the application program has an instance of the application program and has a synchronized data area containing data output by the instance of the application program. Under control of the new computer, a joint message is broadcast to the other computers indicating that the new computer is to share the application program. The new computer then receives from each other computer a node identification that identifies that computer. The new computer selects one of the computers for which a node identification has been received. Then the new computer sends a request to the selected computer for a copy of the data in the synchronized data area. Upon receiving the copy of the data from the selected computer, the new computer generates a display based on the received copy of the data so that the new computer joins in the sharing of the application program.